import request from '@/utils/request.js'
export function apiArticleList ({ channelsID, timestamp }) {
  return request({
    url: '/app/v1_1/articles',
    method: 'get',
    params: {
      channel_id: channelsID,
      timestamp,
      with_top: 1
    }
  })
}
export function apiArticleDislike (articleID) {
  return request({
    url: '/app/v1_0/article/dislikes',
    method: 'post',
    data: {
      target: articleID
    }
  })
}
export function apiArticleReport ({ articleID, type, remark = '' }) {
  return request({
    url: '/app/v1_0/article/reports',
    method: 'post',
    data: {
      target: articleID,
      type,
      remark
    }
  })
}

export function apiArticleDetail (articleID) {
  return request({
    url: '/app/v1_0/articles/' + articleID,
    method: 'get'
  })
}
